package cn.lg.soar.system.biz.modules.auth.entity;

import cn.lg.soar.database.base.entity.BaseEntity;
import cn.lg.soar.database.enums.ExpressionEnum;
import cn.lg.soar.database.enums.ProvideTypeEnum;
import cn.lg.soar.database.enums.SpliceTypeEnum;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2023/10/28 16:51
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@TableName("lg_sys_data_rule_item")
@Getter
@Setter
public class DataRuleItem extends BaseEntity {

    private static final long serialVersionUID = 7473536041003906050L;

    @Schema(description = "主键id")
    @TableId
    private Long id;

    private Long ruleId;

    /**
     * 列名
     */
    private String columnName;

    /**
     * 表达式
     */
    private ExpressionEnum expression;

    /**
     * 列值供应方式
     */
    private ProvideTypeEnum provideType;

    /**
     * 列值
     */
    private String columnValue;

    /**
     * 条件拼接方式
     */
    private SpliceTypeEnum spliceType;

    @Override
    public Serializable primaryKey() {
        return id;
    }

}
